// 节流
export default function throttle (fn, time) {
  let timer = null
  return function () {
    if (timer) {
      return false
    }
    timer = setTimeout(() => {
      fn.call(this)
      timer = null
    }, time)
  }
}
